import { defineStore } from 'pinia'


export const useBootStore = defineStore({
  id: 'boot',
  state: () => {
    return {
      simulate: false,
      layerId: null
    }
  },
  actions: {
    setSimulate(bool:boolean,layerId:string):void {
      this.simulate = bool
      this.layerId = layerId
    },
    clearSimulate():void {
      this.simulate = false
      this.layerId = null
    }
  },
  persist: {
    storage: localStorage,
    paths: ['simulate','layerId'],
  }
})